﻿// 主界面

using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
using UIKit;


namespace DemoProject
{
    public class MainForms : BaseUIForms
    {

        void Awake()
        {
            //本窗体状态
            CurrentUIType.UIForms_Type = UIFormsType.Normal;
            CurrentUIType.UIForms_ShowMode = UIFormsShowMode.HideOther;

            //事件注册
            AddClickEventListener("Btn_Market",
                p => ShowUIForms(UIFormsID.MarketForms.ToString())
            );            
            AddClickEventListener("Btn_Exit",   //这个退出游戏，需要调试？？？
                p => CloseUIForms<MarketForms>()
            );
        }//Awake_end

        //测试
        //IEnumerator Start()
        //{
        //    yield return new WaitForSeconds(2F);
        //    UIManager.GetInstance().Test_DisplayArrayCount();
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //}

        #region  窗体生命周期
        //public override void OnOpen()
        //{
        //    base.OnOpen();
        //    Log.Write(GetType() + "/OnOpen()");
        //}

        //public override void OnReOpen()
        //{
        //    base.OnReOpen();
        //    Log.Write(GetType() + "/OnReOpen()");
        //}

        //public override void OnFreeze()
        //{
        //    base.OnFreeze();
        //    Log.Write(GetType() + "/OnFreeze()");
        //}

        //public override void OnClose()
        //{
        //    base.OnClose();
        //    Log.Write(GetType() + "/OnClose()");
        //}
        #endregion
    }//Class_end
}